package com.yudean.esb.dao.mds;

import com.yudean.esb.domain.mds.MdsPLNData;
import com.yudean.esb.mapper.mds.MdsPLNDataMapper;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;


@Repository("mdsPLNDataDao")
@Scope("prototype")
public class MdsPLNDataDao {
    @Resource
    private MdsPLNDataMapper mdsPLNDataMapper;


    public List<MdsPLNData> getPlnDataYearly(String pYear, String pScenario, String pVersion, String pSystem) {

        List<MdsPLNData> list = mdsPLNDataMapper.getPlnDataYearly(pYear, pScenario, pVersion, pSystem);
        if (list == null || list.size() < 1) {
            return null;
        }
        return list;
    }


    public List<MdsPLNData> getPLNActualData(String pScenario, String periodTrans, String pSystem, String compCode) {

        List<MdsPLNData> list = mdsPLNDataMapper.getPLNActualData(pScenario, periodTrans, pSystem, compCode);
        if (list == null || list.size() < 1) {
            return null;
        }
        return list;
    }

    public List<MdsPLNData> getPlnDataYearlyByComp(String pYear, String pScenario, String pVersion, String pSystem, String compCode) {
        List<MdsPLNData> list = mdsPLNDataMapper.getPlnDataYearlyCompCode(pYear, pScenario, pVersion, pSystem, compCode);
        if (list == null || list.size() < 1) {
            return null;
        }
        return list;
    }
}
